package com.amado.webservice;

import java.io.IOException;

import javax.xml.bind.JAXBException;

import com.amado.webservice.entity.Response;
import com.amado.webservice.util.XmlUtil;

public class StringToXml {
	public static void main(String[] args) {
		String xml = "<?xml version=\"1.0\"  encoding=\"utf-8\"?>\r\n" + 
				"<request>\r\n" + 
				"	<head>\r\n" + 
				"		<!-- 给外单位分配的用户代号 -->\r\n" + 
				"		<yhdh>${userName}</yhdh>\r\n" + 
				"		<!-- 请求机器IP地址 -->\r\n" + 
				"		<ip>${ip}</ip>\r\n" + 
				"		<!-- 本日流水号，从1开始，按1递增 -->\r\n" + 
				"		<lsh>${lsh}</lsh>\r\n" + 
				"	</head>\r\n" + 
				"	<body>\r\n" + 
				"		<!-- 本用户访问指定表数据的授权码,相当于访问对象的密钥. -->\r\n" + 
				"		<sqm>${sqm}</sqm>\r\n" + 
				"	</body>\r\n" + 
				"</request>";
		System.out.println(xml.replace("${userName}", "admin").replace("${ip}", "192.168.0.2")
				.replace("${lsh}", "lsh123123123").replace("${sqm}", "asdfsdafsdfdsaf"));
		
	}


}
